In a variety of situations, when several queued tasks have to be performed on one or several computers or processors for several users, it is necessary for a given available processor to decide which of the available pending tasks to perform first. Systems processing large numbers of tasks queued by users may experience issues related to load buffering. When a task takes a long time to process users may queue work items faster than they can be processed.
One approach is to put new tasks into a queue upon arrival to be processed in the first-in-first-out (FIFO) manner by the processor. This principle is straightforward one user. However, for multiple users queuing tasks at random times, when all users expect reasonably fast processing, this approach might be unsatisfactory.
For example, suppose every task takes 10 seconds to be processed. A user A comes first and quickly puts one hundred tasks into the queue so that it will take 17 minutes to process all of them. One minute after user A had put his tasks into the queue, a user B queues a single task. If the system follows the FIFO rule, the single task from user B would not be processed until all tasks of user A are processed about 16 minutes later. User B has to wait about 16 minutes to just have a single task processed in 10 seconds.
Another common approach is to assign to each task a number so that the processor can choose a task with a highest priority.
When several users provide tasks for the processors, care must be taken to prioritize tasks in accordance with users' expectations, for example, by dividing processor time and other resources equitably between the users. The equitability in this context may imply equitable sharing of processor time, of how frequently tasks are provided by the users, and how large the user's tasks are. The new tasks of a user who recently used more processor time, posted more tasks and more cumulative task volume should have comparatively smaller priority than a new task from a less demanding user.
One example of such tasks is optical character recognition (OCR) processing of images (in any graphic format, such as pdf, tiff, jpeg, etc.) containing text. In this case the size or volume of each task is measured in pages. The processing time of a task is not necessarily directly related to the number of pages in the task, at least because of the amount of text on different pages within different tasks may vary.